// Linux Filesystem Attribute support
// Copyright 2005 (C) Ralph Thomas

#ifndef LINUX_FS_ATTR_H
#define LINUX_FS_ATTR_H

#include <string>
#include <boost/filesystem/path.hpp>

namespace model {
	//
	// int setAttr( bfs::path& target, const std::string& name, const std::string& value )
	//
	/// Set the named attribute on the given target. This method returns a standard model
	/// error value (where 0 is okay and everything else is bad).
	///
	/// \param	target	the file to set the attribute on.
	/// \param	name	the name of the attribute to set.
	/// \param	value	the value of the attribute to set.
	/// \return	zero if everything was okay, a model error code otherwise.
	//
	int setAttr( const boost::filesystem::path& target, const std::string& name,
		const std::string& value );
	//
	// int getAttr( bfs::path& target, const std::string& name, std::string& value )
	//
	/// Return the specified attribute in the value parameter. This method returns a
	/// standard model error code.
	///
	/// \param	target	the file to get the attribute from.
	/// \param	name	the name of the attribute to get.
	/// \param	value	the value of the named attribute (if it exists)
	/// \return	zero if everything was okay, a model error code otherwise.
	//
	int getAttr( const boost::filesystem::path& target, const std::string& name,
		std::string& value );
};

#endif

